package com.fk.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.fk.dao.impl.ChanPinFenLeiDaoImpl;
import com.fk.dao.impl.ShangPinFenLeiImpl;
import com.fk.dao.impl.XinWenXiangQingDaoImpl;
import com.fk.entity.ChanPinFenLei;
import com.fk.entity.ShangPinFenLei;
import com.fk.entity.XinWenXiangQing;



public class HomeServlet extends HttpServlet {
	
       
   
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		//锟斤拷品锟斤拷锟斤拷1
		ShangPinFenLeiImpl tpDao=new ShangPinFenLeiImpl();
		List<ShangPinFenLei> tpList=tpDao.getChenLei();
		request.setAttribute("tpList", tpList);
		//
		
	
		//棣栭〉鏂伴椈璧勮
		XinWenXiangQingDaoImpl syxwDao=new XinWenXiangQingDaoImpl();
		List <XinWenXiangQing> syxwList=syxwDao.getsyxwList();
		request.setAttribute("syxwList", syxwList);
		
		
		
		
		// 产品分类
		ChanPinFenLeiDaoImpl chanDao = new ChanPinFenLeiDaoImpl();
		List<ChanPinFenLei> chanList = chanDao.getChanFenLei();
		request.setAttribute("chanList", chanList);
	
		request.getRequestDispatcher("index.jsp").forward(request, response);
	}

	
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
	}

}
